<?php
class Escape_View_Helper_FormOptions
{
    public function formOptions($options, $selected=null)
    {
        $output = "";
    	foreach ($options as $value=>$label) {
        	$output .= '<option value="' . htmlspecialchars($value) . '" '; 
        	
        	if ($selected == $value)
        	{
        		$output .= 'selected="selected"';
        	}
        	
        	$output .= '>' . htmlspecialchars($label) . '</option>';
        	
        	$output .= "\n";
        }
        
    	
    	
        return $output;
    }
}
